package com.hsylient.javase.chapter11.demo05;

import java.util.concurrent.TimeUnit;

/**
 * 使用TimeUnit来取代Thread.sleep()
 */
public class TimeUnitTest {
    public static void main(String[] args) throws InterruptedException {
        TimeUnit.SECONDS.sleep(2);
        System.out.println("睡了两秒");
    }
}
